﻿using Sasc.PV.BLL;
using Sasc.PV.DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Sasc.PV.Web.Admin
{
    public partial class OnlineCount : PVAdminPage
    {
        public string TiXingJianGe = "30";
        public string TanChuStr = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //刷新当前用户的激活时间
                DbHelperSQL.ExecuteSQL("update ERPUser set ActiveTime=getdate() where UserName='" + PublicMethod.GetSessionValue("UserName") + "'");
                this.HyperLink1.Text = DbHelperSQL.GetSHSL("select count(*) from ERPUser where datediff(minute,ActiveTime,getdate())<20");

                //获得提醒的间隔时间，是否提醒
                var MyModel = new ERPTiXing();
                MyModel.GetModel(int.Parse(PublicMethod.GetSessionValue("UserID")));
                TiXingJianGe = MyModel.TiXingTime;
            }
            catch (Exception ex) { 
            }
        }
    }
}